package com.zxl.util.search;

import java.util.Timer;

public class TimerRun {

	static Timer timer = new Timer();
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		int minute = Integer.parseInt(ConfigPropertiesUtils.getStringValue("interval"));
		timer.schedule(new MyTask(), 0, 1000 * 60 * minute);
		
	}

	static class MyTask extends java.util.TimerTask {
		@Override
		public void run() {
			System.out.println("----------");
			new MyTask().cancel();
			String[] args = null;
			Run.main(args);
//			stop();
		}

	}
	
	public static void stop(){
		timer.cancel();
	}

}
